home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tw200d.zip / TW200D.TXT < prev   
Text File  |  1990-05-09  |  13KB  |  299 lines

  1.                                     TW200
  2.                    COPYRIGHT (C) 1990 RICHARD D. FOTHERGILL
  3.                    MULTI-LEVEL WINDOWS, MENUS AND UTILITIES
  4.                          for Turbo Pascal Version 5.X
  5.  
  6.                              FILES on your disk:
  7.  
  8.                 TW200d.TPU - Turbo Pascal window unit file
  9.                 TD200.PAS  - Demonstration program source code
  10.                 TD200.EXE  - Compiled demonstration program
  11.  
  12.                            WARRANTY AND DISCLAIMER
  13.  
  14.          The author makes no warranties, expressed or implied, as to the
  15.      quality or performance of this program.  The author will not be held
  16.      liable for any direct, indirect, incidental or consequential damages
  17.      resulting from the use of this program.  Your use of the program
  18.      constitutes your agreement to this disclaimer and your release of
  19.      the author from any form of liability or litigation.  Any brand or
  20.      product names are trademarks or registered trademarks of their
  21.      respective holders.
  22.  
  23.          This is a demonstration file for evaluation only.  Some features
  24.      are not available and the maximum windows has been limited to three.
  25.      This document file is a condensed version to give you a description
  26.      of the statements and function you will have available in the
  27.      registered version.  You can order the registered version, which
  28.      includes a printed manual, by sending $25.00 ($30.00 for 3-1/2"
  29.      disk) plus $1.50 for shipping and handling to:
  30.  
  31.                    Richard Fothergill
  32.                    141 Oak Hill Road
  33.                    Pittsfield, MA  01201
  34.  
  35.          Support for TW200 will be available to registered uses online
  36.      through:
  37.                    GEnie - R.FOTHERGILL
  38.                    CServ - 76210,443
  39.                    the Oak Hill BBS (413) 499-7245
  40.  
  41.  
  42.      --------------------------------------------------------------------
  43.      ATTR function
  44.      --------------------------------------------------------------------
  45.      Purpose  Calculate the color attribute given the foreground and
  46.               background colors.  Returns an integer value.
  47.  
  48.      Syntax   txtattr := Attr(fg,bg)
  49.  
  50.      --------------------------------------------------------------------
  51.      CALCULATOR procedure
  52.      --------------------------------------------------------------------
  53.      Purpose  Presents a four function with memory calculator in a pop-up
  54.               window.
  55.  
  56.      Syntax   Calculator(row,col,wattr,shdw)
  57.  
  58.      --------------------------------------------------------------------
  59.      CLOSEWIN procedure
  60.      --------------------------------------------------------------------
  61.      Purpose  To remove the last window opened from the screen, restore
  62.               the area under the window and restore the cursor position.
  63.  
  64.      Syntax   Closewin
  65.  
  66.      --------------------------------------------------------------------
  67.      CURDIR function
  68.      --------------------------------------------------------------------
  69.      Purpose  Returns a string representing the DOS current directory in
  70.               the form of Drive:\Dir\
  71.  
  72.      Syntax   cdir := Curdir
  73.  
  74.      --------------------------------------------------------------------
  75.      CURDISPLAY function
  76.      --------------------------------------------------------------------
  77.      Purpose  Returns an integer value representing the type of the
  78.               active monitor.
  79.                    0 - MONO             3 - MCGA
  80.                    1 - CGA              4 - VGA
  81.                    2 - EGA
  82.  
  83.      Syntax   vidtype := Curdisplay
  84.  
  85.      --------------------------------------------------------------------
  86.      CURDRIVE function
  87.      --------------------------------------------------------------------
  88.      Purpose  Returns a string representing the DOS current drive in the
  89.               form of drive letter followed by a colon.
  90.  
  91.      Syntax   cd := Curdrive
  92.  
  93.      -------------------------------------------------------------------
  94.      CURSOROFF procedure
  95.      -------------------------------------------------------------------
  96.      Purpose  Turns the cursor off.
  97.  
  98.      Syntax   Cursoroff
  99.  
  100.      -------------------------------------------------------------------
  101.      CURSORON procedure
  102.      -------------------------------------------------------------------
  103.      Purpose  Turns the cursor on.
  104.  
  105.      Syntax   Cursoron
  106.  
  107.      --------------------------------------------------------------------
  108.      FALIGN function
  109.      --------------------------------------------------------------------
  110.      Purpose  Formats a file name string to its full width of eight for
  111.               the filename and three for the extension.  Any missing
  112.               characters are padded with spaces to form the string.
  113.  
  114.      Syntax   filname := Falign(filspec)
  115.  
  116.      --------------------------------------------------------------------
  117.      FAKEWIN procedure
  118.      --------------------------------------------------------------------
  119.      Purpose  Draws a box on the screen.  No screen saving performed.
  120.  
  121.      Syntax   Fakewin(row,col,rows,cols,wattr,battr,brdr,sattr,shdw,zoom)
  122.  
  123.      --------------------------------------------------------------------
  124.      FEXISTS function
  125.      --------------------------------------------------------------------
  126.      Purpose  Boolean function indicating whether the file specified
  127.               exists in the path and file spec given.
  128.  
  129.      Syntax   filexists := Fexists(fspec)
  130.  
  131.      --------------------------------------------------------------------
  132.      GETFIELD procedure
  133.      --------------------------------------------------------------------
  134.      Purpose  Provide a formatted data input field.
  135.  
  136.      Syntax   Getfield(row,col,ans,dtype,size,dec,lstkey,inattr,outattr)
  137.  
  138.      --------------------------------------------------------------------
  139.      GETKEY procedure
  140.      --------------------------------------------------------------------
  141.      Purpose  Get a key stroke from the keyboard.  Returns CH1 = to ASCII
  142.               code if it is a printable character and CH2 = #0.  If an
  143.               extended key is pressed returns CH1 = #0 and CH2 = extended
  144.               key code.
  145.  
  146.      Syntax   Getkey(ch1,ch2)
  147.  
  148.      --------------------------------------------------------------------
  149.      GETREC procedure
  150.      --------------------------------------------------------------------
  151.      Purpose  Presents multiple fields for edited data input based on
  152.               information provided in the descriptor array.  Allows
  153.               movement from field to field and action to be taken can be
  154.               determined by the last key pressed.
  155.  
  156.      Syntax   Getrec(Info,Datarr,Trecs,Lstkey,Doedit,Inattr,Outattr)
  157.  
  158.      --------------------------------------------------------------------
  159.      MAKEFMENU function
  160.      --------------------------------------------------------------------
  161.      Purpose  Presents a pop-up menu of a directory of files matching the
  162.               specification and attribute given from which a selection
  163.               can be made.  Returns, in a pathstr type, the file selected
  164.               or a null string if Esc is pressed.
  165.  
  166.      Syntax   pikfil := Makefmenu(fspec,row,col,rows,wattr,battr,sattr,
  167.                                   shdw,zoom,hlattr)
  168.  
  169.      --------------------------------------------------------------------
  170.      MAKEHMENU procedure
  171.      --------------------------------------------------------------------
  172.      Purpose  Presents a horizontal menu within a previously open window.
  173.               Returns an integer value which indicates the selection
  174.               made.
  175.  
  176.      Syntax   Makehmenu(hmenurec)
  177.  
  178.      --------------------------------------------------------------------
  179.      MAKELMENU function
  180.      --------------------------------------------------------------------
  181.      Purpose  Presents a vertical list within a previously open window.
  182.               Returns a word value which indicates the selection made.
  183.               The list can be longer than the window with the direction
  184.               keys controlling movement.
  185.  
  186.      Syntax   Makelmenu(recarr,recs,startpos,hlattr)
  187.  
  188.      --------------------------------------------------------------------
  189.      MAKEVMENU procedure
  190.      --------------------------------------------------------------------
  191.      Purpose  Presents a vertical menu within a previously open window.
  192.               Returns an integer value which indicates the selection
  193.               made.
  194.  
  195.      Syntax   Makevmenu(vmenurec)
  196.  
  197.      --------------------------------------------------------------------
  198.      MAXMEM function
  199.      --------------------------------------------------------------------
  200.      Purpose  Returns a long integer representing the total conventional
  201.               memory in the machine.
  202.  
  203.      Syntax   maxbytes := Maxmem
  204.  
  205.      --------------------------------------------------------------------
  206.      OPENWIN procedure
  207.      --------------------------------------------------------------------
  208.      Purpose  Open a text window on the screen with automatic screen
  209.               saving.
  210.  
  211.      Syntax   Openwin(row,col,rows,cols,wattr,battr,brdr,sattr,shdw,zoom)
  212.  
  213.      --------------------------------------------------------------------
  214.      POWEROF function
  215.      --------------------------------------------------------------------
  216.      Purpose  Returns a real number raised to a power.
  217.  
  218.      Syntax   num := Powerof(realnum,power)
  219.  
  220.      --------------------------------------------------------------------
  221.      PRINTCWIN procedure
  222.      --------------------------------------------------------------------
  223.      Purpose  Display text centered in the window on the ROW specified
  224.               using the current attributes and window coordinates.
  225.  
  226.      Syntax   Printcwin(row,strdat)
  227.  
  228.      --------------------------------------------------------------------
  229.      PRINTWIN procedure
  230.      --------------------------------------------------------------------
  231.      Purpose  Display text in the current window using the current
  232.               attributes and window coordinates.
  233.  
  234.      Syntax   Printwin(row,col,strdat)
  235.  
  236.      --------------------------------------------------------------------
  237.      PRTEST function
  238.      --------------------------------------------------------------------
  239.      Purpose  Boolean function indicating the status of the printer port
  240.               specified (either 1 or 2).
  241.  
  242.      Syntax   prtok := Prtest(1)
  243.  
  244.      --------------------------------------------------------------------
  245.      SCOLOR procedure
  246.      --------------------------------------------------------------------
  247.      Purpose  To change the color attributes of a specified area of the
  248.               screen.
  249.  
  250.      Syntax   Scolor(row,col,rows,cols,attr)
  251.  
  252.      --------------------------------------------------------------------
  253.      SCROLLWIN procedure
  254.      --------------------------------------------------------------------
  255.      Purpose  Scroll the current window either up or down one line.
  256.  
  257.      Syntax   Scrollwin(dir)
  258.  
  259.      --------------------------------------------------------------------
  260.      SFILL procedure
  261.      --------------------------------------------------------------------
  262.      Purpose  Fills a specified area of the screen with a specified
  263.               character and color attribute.
  264.  
  265.      Syntax   Sfill(row,col,rows,cols,char,attr)
  266.  
  267.      --------------------------------------------------------------------
  268.      SPRINT procedure
  269.      --------------------------------------------------------------------
  270.      Purpose  Displays string data at a specified location with a
  271.               specified color attribute.
  272.  
  273.      Syntax   Sprint(row,col,strdat,attr)
  274.  
  275.      --------------------------------------------------------------------
  276.      SPRINTC procedure
  277.      --------------------------------------------------------------------
  278.      Purpose  Displays string data centered within specified columns and
  279.               on a specified row with a specified color attribute.
  280.  
  281.      Syntax   Sprintc(row,coll,colr,strdat,attr)
  282.  
  283.      --------------------------------------------------------------------
  284.      STRINGOF function
  285.      --------------------------------------------------------------------
  286.      Purpose  Returns a string of a specified length of a specified
  287.               character.
  288.  
  289.      Syntax   charstr := Stringof(los,filchar)
  290.  
  291.      --------------------------------------------------------------------
  292.      TITLEWIN procedure
  293.      --------------------------------------------------------------------
  294.      Purpose  To print a title in the border of a window using the color
  295.               attribute specified at a specified location.
  296.  
  297.      Syntax   Titlewin(loc,attr,strdat)
  298.  
  299.